﻿using EMall.OrderService.Orders;
using Microsoft.EntityFrameworkCore;
using System.Reflection;
namespace EMall.OrderService
{
    public class OrderServiceDbContext : DbContext
    { 
        public DbSet<Order> Orders { get; set; } 
        public OrderServiceDbContext(DbContextOptions<OrderServiceDbContext> options)
            : base(options)
        {
        }
        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            base.OnConfiguring(optionsBuilder);
        }
        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);
            modelBuilder.ApplyConfigurationsFromAssembly(Assembly.GetExecutingAssembly());
        }
    }
}